# gls/Makefile
VCS = vcs
VCS_GLS_FLAGS = -full64 -sverilog +v2k -timescale=1ns/1ps \
                -debug_acc+all -kdb -lca \
                +define+GLS_SIM \
                +sdfverbose \
                -notice

NETLIST = ../gls/netlist/riscv_npu_soc_syn.v
SDF     = ../gls/sdf/riscv_npu_soc_syn.sdf
TB      = ../gls/tb_gls.sv
RTL     = $(wildcard ../rtl/*.sv)
TESTS   = $(wildcard ../verification/tests/*.sv)

compile_gls:
	$(VCS) $(VCS_GLS_FLAGS) $(NETLIST) $(TB) $(TESTS) \
	       -l gls_comp.log -o simv_gls

run_gls:
	./simv_gls +UVM_TESTNAME=npu_dotp_test \
	           -l gls_run.log \
	           +nowarn+SDFNCAP

wave_gls:
	./simv_gls +UVM_TESTNAME=npu_dotp_test \
	           -vpd gls_wave.vpd \
	           -l gls_wave.log
	verdi -vpd gls_wave.vpd &

full_gls: compile_gls run_gls
	@echo "GLS Verification PASSED"

clean:
	rm -rf simv_gls* csrc *.log *.vpd DVEfiles